package com.zhike.common.repository;

import java.util.Date;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModelProperty;

@Document(collection = "oprlog")
public class OperateLog {

    @Id
    private String logId;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "日志级别")
    private String oprLevel;

    @ApiModelProperty(value = "描述")
    private String oprDesc;

    @ApiModelProperty(value = "业务")
    private String oprBz;

    @ApiModelProperty(value = "内容")
    private String oprContent;

    @ApiModelProperty(value = "时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date oprTime;

    @ApiModelProperty(value = "平台标识")
    private String osType;

    @ApiModelProperty(value = "ip")
    private String ip;

    @ApiModelProperty(value = "离线IP地址")
    private String ipRegion;

    public OperateLog setLogId(String logId) {
        this.logId = logId;
        return this;
    }

    public String getLogId() {
        return this.logId;
    }

    public OperateLog setPhone(String phone) {
        this.phone = phone;
        return this;
    }

    public String getPhone() {
        return this.phone;
    }

    public OperateLog setOprLevel(String oprLevel) {
        this.oprLevel = oprLevel;
        return this;
    }

    public String getOprLevel() {
        return this.oprLevel;
    }

    public OperateLog setOprDesc(String oprDesc) {
        this.oprDesc = oprDesc;
        return this;
    }

    public String getOprDesc() {
        return this.oprDesc;
    }

    public OperateLog setOprBz(String oprBz) {
        this.oprBz = oprBz;
        return this;
    }

    public String getOprBz() {
        return this.oprBz;
    }

    public OperateLog setOprContent(String oprContent) {
        this.oprContent = oprContent;
        return this;
    }

    public String getOprContent() {
        return this.oprContent;
    }

    public OperateLog setOprTime(Date oprTime) {
        this.oprTime = oprTime;
        return this;
    }

    public Date getOprTime() {
        return this.oprTime;
    }

    public OperateLog setOsType(String osType) {
        this.osType = osType;
        return this;
    }

    public String getOsType() {
        return this.osType;
    }

    public OperateLog setIp(String ip) {
        this.ip = ip;
        return this;
    }

    public String getIp() {
        return this.ip;
    }

    public OperateLog setIpRegion(String ipRegion){
        this.ipRegion = ipRegion;
        return this;
    }

    public String getIpRegion(){
        return this.ipRegion;
    }

}
